package com.lifang.imgsoa.base.controller;

import org.springframework.stereotype.Component;

import com.leo.jackson.JsonTool;
import com.lifang.imgsoa.model.Response;
import com.lifang.imgsoa.util.Constants;

@Component
public class BaseController {

	protected String writeValueAsString(Object obj) {
		
		Response response = new Response();
		response.setStatus(Constants.成功);
		response.setMsg("成功");
		response.setData(obj);

		return JsonTool.writeValueAsString(response);
	}
	
	

}
